package com.contactbook.web.server.servlet;

import com.contactbook.web.client.dto.AccountDTO;
import com.contactbook.web.client.service.AccountService;
import com.contactbook.web.server.service.AccountServiceImpl;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

public class AccountServlet extends RemoteServiceServlet implements AccountService {
	
	private static final long serialVersionUID = 1L;
	
	private AccountService impl = new AccountServiceImpl();
	
	public AccountServlet() {
		super();
	}

	@Override
	public AccountDTO login(String login, String password) {
		return impl.login(login, password);
	}

	@Override
	public void logout() {
		impl.logout();	
	}
	
	@Override
	public AccountDTO create(AccountDTO accountDTO) {
		return impl.create(accountDTO);
	}

	@Override
	public void delete() {
		impl.delete();	
	}

	@Override
	public void update(AccountDTO accountDTO, String login, String password) {
		impl.update(accountDTO, login, password);	
	}

}
